package com.tuanzi.loan.web.lazy.settlementsystem;

import com.tuanzi.loan.business.service.settlementsystem.SettlementPrepayService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementPrepayRequest;
import com.tuanzi.loan.vo.response.settlementsystem.SettlementPrepayResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-08-20 14:07
 */
public class SettlementPrepayLazyDataModel extends BaseLazyDataModel<SettlementPrepayRequest,SettlementPrepayResponse> {
    private SettlementPrepayService settlementPrepayService = SpringContextHolder.getBean(SettlementPrepayService.class);
    public SettlementPrepayLazyDataModel(SettlementPrepayRequest settlementPrepayRequest) {
        super(settlementPrepayRequest);
    }
    @Override
    protected Page<SettlementPrepayResponse> doLoad(PageSearcher<SettlementPrepayRequest> pageSearcher) {
        return settlementPrepayService.list(pageSearcher);
    }
}